# -*- coding: utf-8 -*-
# @Author : HaleShi
# @Time : 2023-05-17
# @File : 文本_生成器.py

import json

#   生成器
def load_file_data():
    with open("./account.txt", mode='r', encoding='utf-8') as f:
        for line in f:
            yield line.strip().split(",")  # ["alex","123"]


#读取json
def load_jsonfile_data():
    with open("./20230526-18-29-37_DDR5内存条_content.json", mode='r', encoding='utf-8') as f:
        data = json.load(f)
        print(data)


def run():
    gen_object = load_file_data()
    for index, info in enumerate(gen_object):
        user = info[0]
        pwd = info[1]
        print(index, user, pwd)
        input('请按任何按键\n')


if __name__ == '__main__':
    run()
